package com.demo2.springioc.autowired;


import com.demo2.springioc.model.UserInfo;
import jakarta.annotation.Resource;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Data
@Component
public class AutowiredDemo {
   public  UserInfo userInfo;


   @Resource(name = "userInfo1")
    public UserInfo getUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
        return userInfo;
    }
}
